/**
 * 登陆页面js 
 */

var login = function(){
	var username = $('#username').val();
	var password = $('#password').val();
	common.showProgress();//显示加载动画
	var json = common.ajaxRequest('service?p=login', {"username":username,"password":password}, 'GET');
	if( json && json.result == 0 )
	{
		window.location.href='page?p=index';
		//common.hideProgress();//关闭加载动画
	}
	else
	{
		common.hideProgress();//关闭加载动画
		alert(json.message);
	}	
};